package vsjgl;

import org.newdawn.slick.Color;
import org.newdawn.slick.opengl.Texture;
import org.newdawn.slick.opengl.TextureLoader;
import org.newdawn.slick.util.ResourceLoader;
import org.lwjgl.opengl.GL11;

public class Sprite {
	private int x,y;
	private Image texture;
	public Sprite(Image texture, int x, int y){
		x=0;
		y=0;
		this.texture=texture;
	}
	public void setX(int newx){
		x= newx;
	}
	public void setY(int newy){
		y= newy;
	}
	public int getX(){
		return x;
	}
	public int getY(){
		return y;
	}
	public void draw(){
		
		this.texture.image().bind();
		
		GL11.glBegin(GL11.GL_QUADS);
	    GL11.glVertex2f(x,y);
		GL11.glVertex2f(x+this.texture.getLX(),y);
		GL11.glVertex2f(x+this.texture.getLX(),y+this.texture.getLY());
		GL11.glVertex2f(x,y+this.texture.getLY());
		
	    GL11.glEnd();
	}
}
